FROM registry.cn-shanghai.aliyuncs.com/lwmeng/node:lts-alpine as builder

WORKDIR /frontend

COPY . .

RUN npm run build

FROM nginx:1.7.9

WORKDIR /frontend

COPY --from=builder /frontend/dist /frontend/

COPY --from=builder /frontend/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80